package com.ruoyi.common.enums.erp;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author YanWenliang
 * @date 2025/1/4 13:51
 * @desciption:
 */
@Getter
@AllArgsConstructor
public enum CrmTaskEnum {
    PUNCHING("0", "钉打工单"),
    BASIC("1", "基础工单"),
    SALES_FRONT("2", "售前工单"),
    PROJECT("3", "项目工单"),
    MAINTENANCE("4", "维修工单"),
    OUTSOURCED("5", "外包型工单"),
    OTHER_SUPPLEMENTARY("6", "其他工单 (后补)"),
    OPERATIONS("7", "运维工单"),
    DEVELOPMENT("8", "研发工单"),
    OVERTIME("9", "加班工单");

    private final String code;
    private final String description;

    public static String getDescription(String code) {
        for (CrmTaskEnum typeEnum : CrmTaskEnum.values()) {
            if (typeEnum.code.equals(code)) {
                return typeEnum.description;
            }
        }
        return "无";
    }
}
